import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:dailypayagent/config/router_manger.dart';

class DataCountPage extends StatefulWidget {
  @override
  DataCountPageState createState() => new DataCountPageState();
}

class DataCountPageState extends State<DataCountPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          centerTitle: true,
          automaticallyImplyLeading: false,
          title: Text('数据统计'),
        ),
        body: ListView(children: <Widget>[
          Material(
            color: Theme.of(context).accentColor,
            child: Container(
              color: Theme.of(context).backgroundColor,
              padding: const EdgeInsets.all(20),
              margin: EdgeInsets.fromLTRB(20, 0, 20, 20),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: <Widget>[
                  Text(
                    '今日新增商户数(家)',
                    style: TextStyle(
                      color: Colors.white60,
                    ),
                  ),
                  SizedBox(
                    height: 10,
                  ),
                  Text(
                    '22',
                    style: TextStyle(color: Colors.white),
                  ),
                  SizedBox(
                    height: 10,
                  ),
                  Row(
                    children: <Widget>[
                      Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: <Widget>[
                          Text(
                            '今日有交易商户(家)',
                            style: TextStyle(
                              color: Colors.white60,
                            ),
                          ),
                          SizedBox(
                            height: 10,
                          ),
                          Text(
                            '56.00',
                            style: TextStyle(color: Colors.white),
                          )
                        ],
                      ),
                      Container(
                        padding: const EdgeInsets.symmetric(horizontal: 20),
                        child: Column(
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: <Widget>[
                            Text(
                              '今日净收款(元)',
                              style: TextStyle(
                                color: Colors.white60,
                              ),
                            ),
                            SizedBox(
                              height: 10,
                            ),
                            Text(
                              '56.00',
                              style: TextStyle(color: Colors.white),
                            )
                          ],
                        ),
                      ),
                    ],
                  ),
                ],
              ),
            ),
          ),
          Material(
            color: Theme.of(context).cardColor,
            child: ListTile(
              title: Text('交易汇总'),
              onTap: () {
                Navigator.of(context).pushNamed(RouteName.dataSummary);
              },
              trailing: Icon(Icons.chevron_right),
            ),
          ),
          SizedBox(
            height: 10,
          ),
          Material(
            color: Theme.of(context).cardColor,
            child: ListTile(
              title: Text('商户统计'),
              onTap: () {
                Navigator.of(context).pushNamed(RouteName.merchantCount);
              },
              trailing: Icon(Icons.chevron_right),
            ),
          ),
          SizedBox(
            height: 1,
          ),
          Material(
              color: Theme.of(context).cardColor,
              child: ListTile(
                title: Text('交易流水'),
                onTap: () {
                  Navigator.of(context).pushNamed(RouteName.transitionList);
                },
                trailing: Icon(Icons.chevron_right),
              )),
          SizedBox(
            height: 10,
          ),
          Material(
            color: Theme.of(context).cardColor,
            child: ListTile(
              title: Text('业务员报表'),
              onTap: () {
                Navigator.of(context).pushNamed(RouteName.salsmanCount);
              },
              trailing: Icon(Icons.chevron_right),
            ),
          )
        ]));
  }
}
